#include "ohos_rtp_transceiver_init.h"
#include <vector>

namespace ohoswebrtc {

OHOSRtpTransceiverInit::OHOSRtpTransceiverInit(
    webrtc::RtpTransceiverInit rtp_transceiver_init)
    : rtp_transceiver_init_(rtp_transceiver_init) {
  RTC_LOG(LS_INFO) << __FUNCTION__ << ": Ctor";
}

OHOSRtpTransceiverInit::OHOSRtpTransceiverInit(webrtc::RtpTransceiverDirection direction, const std::vector<std::string> &stream_ids,
      const std::vector<webrtc::RtpEncodingParameters *> &send_encodings) {
  rtp_transceiver_init_.direction = direction;
  rtp_transceiver_init_.stream_ids = stream_ids;
  for (const auto* encoding : send_encodings) {
    if (encoding) {
      rtp_transceiver_init_.send_encodings.push_back(*encoding);
    }
  }      
}

OHOSRtpTransceiverInit::~OHOSRtpTransceiverInit() {
  RTC_LOG(LS_INFO) << __FUNCTION__ << ": Dtor";
}



}  // namespace ohoswebrtc